package com.wt.springsamples.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("tb_org")
public class Org extends DeletedEntity{
    @TableId(type = IdType.AUTO)
    private Long id;
    private String code;
    private String name;
    private Long pid;
    private Integer status;
    /**
     * 可以存储部门的层级编码，如：//D001/D001-1/D001-1-1,
     * 用于快速查询指定部门的所有下级及其子级部门以避免递归，
     */
    private String levelPath;
}
